﻿Imports Entidades
Public Class frmAñadirUsuario
    Private Sub btnCancelar_Click(sender As Object, e As EventArgs) Handles btnCancelar.Click
        Me.Close()

    End Sub

    Private Sub btnAñadir_Click(sender As Object, e As EventArgs) Handles btnAñadir.Click
        If txtNombre.Text = "" Then
            MessageBox.Show("Indica el nombre del usuario")
            Exit Sub
        End If
        Dim usu As New Usuario(txtNombre.Text)
        Dim st As String = miGestion.añadirUsuario(usu)
        If st <> "" Then
            MessageBox.Show(st)
            Exit Sub
        Else
            MessageBox.Show("Usuario añadido correctamente")
        End If
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Me.Close()
    End Sub
End Class